from typing import Annotated, List

from langchain_core.tools import tool


@tool
def multiply_by_max(
        a: Annotated[int, "scale factor"],
        b: Annotated[List[int], "list of ints over which to take maximum"],
) -> int:
    """Multiply a by the maximum of b."""
    return a * max(b)


print(multiply_by_max.args_schema.schema())
print(multiply_by_max.invoke({"a": 3, "b": [2, 3, 4]}))
